<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="applicable-device" content="pc,mobile"/>
    <title>拉新</title>

<link rel="stylesheet" href="css/index.css" type="text/css" />
<link rel="stylesheet" href="./css/animate.css" type="text/css"/>
<link rel="stylesheet" href="./css/jquery.message.css" type="text/css"/>


<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.message.js"></script>
<script type="text/javascript" src="js/util.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/moment.js"></script>
<script type="text/javascript" src="./js/unitAuto.min.js"></script>

</head>

<body>

    <div class="box">
        <div class="title"><span>团队中心</span></div>

        <div class="team_title"><img src="./images/star.png" alt=""><span>团队名称</span><img src="./images/star1.png" alt=""></div>

        <div class="team_box">
            <div class="team_con">
                <div class="team_con-img">
                    <div class="team_con-logo">
                        <img  src="" alt="">
                    </div>
                </div>
                <div class="team_con-txt">基金会志愿者队</div>
            </div>
        </div>
        <div class="team_title"><img src="./images/star.png" alt=""><span>数据展示</span><img src="./images/star1.png" alt=""></div>

        <div class="team_data">
            <div class="team_data_left">
                <div>0</div>
                <div>队员人数</div>
            </div>
            <div class="team_data_right">
                <div>0</div>
                <div>拉新人数</div>
            </div>
        </div>

        <div class="team_title"><img src="./images/star.png" alt=""><span>拉新PK</span><img src="./images/star1.png" alt=""></div>

        <div class="team_data team_data_pk">
            <div class="team_data_left">
                <div><a href="./ranking.html?type=1">团队拉新排行</a></div>
            </div>
            <div class="team_data_right">
                <div><a href="./ranking.html?type=2">队员拉新排行</a></div>
            </div>
        </div>
    </div>
</body>
</html>
<script>
    let team_id = getUrlParameter('id')
    console.log('team_id1>>', team_id)

    postRequest(teamInfo_api,{team_id}).then((res)=>{
        let info = res.data
        $('.team_con-logo img').attr('src', res.data.logo || '');

        $('.team_con-txt').text(info.name || '未知团队');
        $('.team_data_left div:first').text(info.member_num || 0);
        $('.team_data_right div:first').text(info.invite_num || 0);

        console.log(res)
    })
</script>
